 function quickSort(arr){
if(arr.length<=1)return arr

let pivot=arr[0]//支点
let left=[],right=[]
for(let i=1;i<arr.length;i++){
    if(arr[i]>pivot){
        right.push(arr[i])
    }else {
        left.push(arr[i])
    }
}
return [...quickSort(left),pivot,...quickSort(right)]

 }
 let arr=[3,3,2,4,6,1,9,5]
 console.log(quickSort(arr));